import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopProductCategoryController } from '../../../controllers';
const uctoominishopProductCategoryRouter = new Router();
const minishopProductCategoryController = new uctooMinishopProductCategoryController();

uctoominishopProductCategoryRouter.post('/add', requireUser, minishopProductCategoryController.add);
uctoominishopProductCategoryRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_product_category'), minishopProductCategoryController.edit);
uctoominishopProductCategoryRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_product_category'), minishopProductCategoryController.delete);

//For getting minishopProductCategory with permission control
uctoominishopProductCategoryRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_product_category'), minishopProductCategoryController.getSingle);
uctoominishopProductCategoryRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_product_category'), minishopProductCategoryController.getMany);
uctoominishopProductCategoryRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_product_category'), minishopProductCategoryController.getMany);

//#endregion AutoCreateCode
export default uctoominishopProductCategoryRouter;
